import Dao.Impl.StudentDaoImpl;
import xml改纯注解.config.SpringConfig;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class AppForAnnotation {
    public static void main(String[] args) {
        ApplicationContext ctx=new AnnotationConfigApplicationContext(SpringConfig.class);
        StudentDaoImpl studentDao = ctx.getBean("studentDao", StudentDaoImpl.class);
        studentDao.save();
    }
}
